export default function(context) {
    // window.addEventListener("load", () => {
    //     if (!("serviceWorker" in navigator)) {
    //         // Service Worker isn't supported on this browser, disable or hide UI.
    //         return;
    //     }

    //     if (!("PushManager" in window)) {
    //         // Push isn't supported on this browser, disable or hide UI.
    //         return;
    //     }

    //     let promiseChain = new Promise((resolve, reject) => {
    //         const permissionPromise = Notification.requestPermission(result => {
    //             resolve(result);
    //         });

    //         if (permissionPromise) {
    //             permissionPromise.then(resolve);
    //         }
    //     }).then(result => {
    //         if (result === "granted") {
    //             execute();
    //         } else {
    //             console.log("no permission");
    //         }
    //     });
    // });
    // function registerServiceWorker() {
    //     return navigator.serviceWorker
    //         .register("service-worker.js")
    //         .then(registration => {
    //             console.log("Service worker successfully registered.");
    //             return registration;
    //         })
    //         .catch(err => {
    //             console.error("Unable to register service worker.", err);
    //         });
    // }
    // function execute() {
    //     registerServiceWorker().then(registration => {
    //         registration.showNotification("Hello World!");
    //     });
    // }
}
